<?php /*a:7:{s:96:"D:\phpstudyV8\phpstudy_pro\WWW\example.com\tp5-admin\application\post\view\home\index\index.html";i:1628841429;s:43:"../application/index/view/common/title.html";i:1626505757;s:41:"../application/index/view/common/seo.html";i:1626506291;s:41:"../application/index/view/common/css.html";i:1628574668;s:44:"../application/index/view/common/header.html";i:1628662388;s:44:"../application/index/view/common/footer.html";i:1623066373;s:40:"../application/index/view/common/js.html";i:1628836400;}*/ ?>
<?php
    function cateUrl($categoryId,$tagId)
    {
        return url("post/home.index/index",['category'=>$categoryId,'tag'=>$tagId]);
    }
    function detailUrl($articleId)
    {
        return url("post/home.index/content",['article_id'=>$articleId]);
    }
?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title><?php echo get_option('site_info')['site_name']; ?></title>

    <meta name="keywords" content="<?php echo get_option('site_info')['site_seo_keywords']; ?>" />
<meta name="description" content="<?php echo get_option('site_info')['site_seo_description']; ?>" />
    <?php
    $version = time();
?>

<link rel="stylesheet" type="text/css" href="https://www.layuicdn.com/layui/css/layui.css" />
<link rel="stylesheet" href="https://unpkg.com/swiper/swiper-bundle.min.css">
<!--<link rel="stylesheet" href="/static/index/css/base.css">-->
<link rel="stylesheet" href="/template/css/base.css?v=<?php echo htmlentities($version); ?>">
<link rel="stylesheet" href="/template/css/list.css?v=<?php echo htmlentities($version); ?>">
</head>
<body>
<!--头部部分-->
<?php
    $user = get_weUser_thirdUser();
    $locaUser = $user['web_user'];
    $third = $user['third_user'];
?>
<div class="header">
    <div class="layui-container">
        <ul class="layui-nav">
            <?php
             $model = new \app\admin\model\system\NavMenuModel();
             $__LIST__=  $model->where("is_main=1")->field("id,name")->limit("6")
                ->order("id DESC")
                ->select();
         if(is_array($__LIST__) || $__LIST__ instanceof \think\Collection || $__LIST__ instanceof \think\Paginator): $i = 0; $__LIST__ = $__LIST__;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$v): $mod = ($i % 2 );++$i;$nav_id=$v['id'];
             $model = new \app\admin\model\system\Nav();
             $__LIST__=  $model->where("nav_id = $nav_id")->field("title,url_link")->limit("6")
                ->order("id DESC")
                ->select();
         if(is_array($__LIST__) || $__LIST__ instanceof \think\Collection || $__LIST__ instanceof \think\Paginator): $i = 0; $__LIST__ = $__LIST__;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vv): $mod = ($i % 2 );++$i;?>
            <li class="layui-nav-item"><a href="<?php echo htmlentities($vv['url_link']); ?>"><?php echo htmlentities($vv['title']); ?></a></li>
            <?php endforeach; endif; else: echo "" ;endif; ?>
            <?php endforeach; endif; else: echo "" ;endif; ?>
        </ul>
        <ul class="layui-nav layui-layout-right">
            <?php if(!isset($locaUser['id']) or !isset($third['openid'])): ?>
            <li class="layui-nav-item"><a href="<?php echo url('user/login/index'); ?>">登录</a></li>
            <li class="layui-nav-item"><a href="<?php echo url('user/register/index'); ?>">注册</a></li>
            <?php else: ?>
            <li class="layui-nav-item">
                <a href="<?php echo url('user/index/index'); ?>">
                    <?php if(isset($locaUser['avatar']) and !empty($locaUser['avatar'])): ?>
                    <img src="<?php echo htmlentities($locaUser['avatar']); ?>" class="base-user-avatar">
                    <?php elseif(isset($third['more']['avatar']) and !empty($third['more']['avatar'])): ?>
                    <img src="<?php echo htmlentities($third['more']['avatar']); ?>" class="base-user-avatar">
                    <?php else: ?>
                    <img src="http://t.cn/RCzsdCq" class="base-user-avatar" >
                    <?php endif; if(isset($locaUser['nickname']) and !empty($locaUser['nickname'])): ?>
                    <?php echo htmlentities($locaUser['nickname']); elseif(isset($third['nickname']) and !empty($third['nickname'])): ?>
                    <?php echo htmlentities($third['nickname']); elseif(isset($locaUser['username']) and !empty($locaUser['username'])): ?>
                    <?php echo htmlentities($locaUser['username']); elseif(isset($third['username']) and !empty($third['username'])): ?>
                    <?php echo htmlentities($third['username']); else: ?>
                    <?php echo htmlentities((isset($locaUser['phone']) && ($locaUser['phone'] !== '')?$locaUser['phone']:"暂未设置任何账户名")); ?>
                    <?php endif; ?>
                </a>
            </li>
            <li class="layui-nav-item"><a href="javascript:chenping.out('<?php echo url("user/index/out"); ?>');">退了</a></li>
            <?php endif; ?>
        </ul>
    </div>
</div>

<!--主体内容-->
<div class="body list">
    <div class="layui-container">
        <div class="layui-row layui-col-space15">
            <div class="layui-col-md2">
                <div class="layui-card arc-category-box">
                    <div class="layui-card-header">
                        热门标签
                    </div>
                    <div class="layui-card-body">
                        <ul class="list-category">
                            <li>
                                <a href="<?php echo cateUrl(0,0); ?>">全部</a>
                            </li>
                            <?php if(is_array($categoryList) || $categoryList instanceof \think\Collection || $categoryList instanceof \think\Paginator): $i = 0; $__LIST__ = $categoryList;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$v): $mod = ($i % 2 );++$i;?>
                            <li>
                                <a href="<?php echo cateUrl($v['id'],0); ?>"><?php echo htmlentities($v['name']); ?></a>
                            </li>
                            <?php endforeach; endif; else: echo "" ;endif; if(is_array($tagList) || $tagList instanceof \think\Collection || $tagList instanceof \think\Paginator): $i = 0; $__LIST__ = $tagList;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$v): $mod = ($i % 2 );++$i;?>
                            <li>
                                <a href="<?php echo cateUrl(0,$v['id']); ?>"><?php echo htmlentities($v['name']); ?></a>
                            </li>
                            <?php endforeach; endif; else: echo "" ;endif; ?>
                        </ul>
                    </div>
                </div>
            </div>
            <div class="layui-col-md7">
                <?php if(is_array($articleList) || $articleList instanceof \think\Collection || $articleList instanceof \think\Paginator): $i = 0; $__LIST__ = $articleList;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$v): $mod = ($i % 2 );++$i;?>
                <div class="layui-card arc-card">
                    <div class="layui-card-body">
                        <ul class="list-arc">
                            <li>
                                <h6 class="arc-title">
                                    <a href="<?php echo url('post/home.index/content',['id'=>$v['id']]); ?>" target="_blank"><?php echo htmlentities($v['post_title']); ?></a>
                                </h6>
                            </li>
                            <li>
                                <div class="arc-desc">
                                    <div class="arc-photo-box">
                                        <a href="<?php echo url('post/home.index/content',['id'=>$v['id']]); ?>" target="_blank">
                                            <img src="<?php echo _get_image_preview_url($v['thumbnail']); ?>" alt="">
                                        </a>
                                    </div>
                                    <div class="arc-content"><?php echo deleteHtml($v['post_desc']); ?></div>
                                </div>
                            </li>
                        </ul>
                    </div>
                    <div class="layui-card-body arc-bottom">
                        <span class="author">
                            <img src="<?php echo _get_image_preview_url($v['user']['avatar']); ?>" alt="">
                            <?php echo htmlentities((isset($v['user']['nickname']) && ($v['user']['nickname'] !== '')?$v['user']['nickname']:'')); ?>
                        </span>
                        <span class="date">
                           <i class="layui-icon layui-icon-date"></i>
                            <?php echo htmlentities((isset($v['update_time']) && ($v['update_time'] !== '')?$v['update_time']:'')); ?>
                        </span>
                        <span>
                            <i class="layui-icon layui-icon-template-1"></i>
                            <?php echo htmlentities((isset($v['post_hits']) && ($v['post_hits'] !== '')?$v['post_hits']:0)); ?>
                        </span>
                        <a href="<?php echo url('post/home.index/content',['id'=>$v['id']]); ?>" class="layui-btn layui-btn-normal layui-btn-radius layui-btn-sm readallarc">阅读全文</a>
                    </div>
                </div>
                <?php endforeach; endif; else: echo "" ;endif; if($articleList->lastPage() > $articleList->currentPage()): ?>
                <div class="layui-card">
                    <div class="layui-card-body">
                        <div class="page">
                            <?php echo $articleList; ?>
                        </div>
                    </div>
                </div>
                <?php endif; ?>
            </div>
            <div class="layui-col-md3">
                <div class="layui-card">
                    <div class="layui-card-header">
                        热门文章
                    </div>
                    <div class="layui-card-body">
                        <ul class="arc-about">
                            <?php if(is_array($hotArticleList) || $hotArticleList instanceof \think\Collection || $hotArticleList instanceof \think\Paginator): $i = 0; $__LIST__ = $hotArticleList;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$v): $mod = ($i % 2 );++$i;?>
                            <li>
                                <a href="<?php echo url('post/home.index/content',['id'=>$v['id']]); ?>" target="_blank"><?php echo htmlentities($v['post_title']); ?></a>
                            </li>
                            <?php endforeach; endif; else: echo "" ;endif; ?>
                        </ul>
                    </div>
                </div>

                <div class="layui-card">
                    <div class="layui-card-header">
                        友情链接
                    </div>
                    <div class="layui-card-body">
                        <ul class="arc-about">
                            <?php
             $model = new \app\admin\model\system\Link();
             $__LIST__=  $model->where("status=1")->field("url_link,photo,title")->limit("6")
                ->order("id DESC")
                ->select();
         if(is_array($__LIST__) || $__LIST__ instanceof \think\Collection || $__LIST__ instanceof \think\Paginator): $i = 0; $__LIST__ = $__LIST__;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$v): $mod = ($i % 2 );++$i;?>
                            <li>
                                <a href="<?php echo htmlentities($v['url_link']); ?>" target="_blank"><?php echo htmlentities($v['title']); ?></a>
                            </li>
                            <?php endforeach; endif; else: echo "" ;endif; ?>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<div class="footer">
    <div class="layui-container">
        <div class="layui-row layui-col-space15">
            <div class="layui-col-md4">
                <div>
                    <div><strong>权益</strong></div>
                    <ul>
                        <li>版权所有：<?php echo get_option('site_info')['site_copyright']; ?></li>
                        <li>ICP 备案：<?php echo get_option('site_info')['site_icp']; ?></li>
                    </ul>
                </div>
            </div>
            <div class="layui-col-md4">
                <div>
                    <div><strong>客服</strong></div>
                    <ul>
                        <li>站长邮箱：<?php echo get_option('site_info')['site_admin_email']; ?></li>
                        <li>站长QQ：<?php echo get_option('system_setting')['qq']; ?></li>
                        <li>站长电话：<?php echo get_option('system_setting')['telphone']; ?></li>
                        <li>站长微信：<?php echo get_option('system_setting')['wechat']; ?></li>
                    </ul>
                </div>
            </div>
            <div class="layui-col-md4">
                <div>
                    <div><strong>架构</strong></div>
                    <ul>
                        <li>项目名称：<?php echo get_option('site_info')['site_name']; ?></li>
                        <li>项目版本：<?php echo get_version()['version_number']; ?></li>
                        <li>项目作者：<?php echo get_option("system_setting")['system_author']; ?></li>
                    </ul>
                </div>
            </div>
        </div>

    </div>
</div>
<!--问题反馈按钮-->
<div class="debug">
    <a href="<?php echo url('index/index/debug'); ?>" target="_blank">问题反馈</a>
</div>
</body>
<script src="/template/js/jquery.js"></script>
<script src="https://www.layuicdn.com/layui/layui.js"></script>
<script src="https://unpkg.com/swiper/swiper-bundle.min.js"> </script>
<script type="text/javascript" src="/static/index/js/base.js"></script>

<script src="/template/lib/scrollfix/scrollfix.min.js"></script>
<script src="/template/js/list.js"></script>
<script type="text/javascript" src="/static/user/js/user.js"></script>

</html>